<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <title>Vue3 Demo</title>
    <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
</head>

<body>
<div style="text-align:center;" id="Application">
    <h1>{{ count }}</h1>
    <button @click="clickButton">点击</button>
</div>
</body>
<script>
    const App = {
        //定义组件中的数据
        data() {
            return {
                //目前我们只用到count数据
                count: 0
            }
        },
        //定义组件中的函数
        methods: {
            clickButton() {
                this.count = this.count + 1
            }
        }
    }
    //将vue组件绑定到页面上id为Application的元素上
    Vue.createApp(App).mount("#Application")
</script>

</html>